﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ViewModels="clr-namespace:ScrumSprintMonitor.Modules.WorkItemMonitor.ViewModels"
    xmlns:Controls="clr-namespace:ScrumSprintMonitor.Modules.WorkItemMonitor.Controls"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:il="clr-namespace:Microsoft.Expression.Interactivity.Layout;assembly=Microsoft.Expression.Interactions">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="TeamMemberBadgeDataTemplate.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <DataTemplate DataType="{x:Type ViewModels:TeamMembersListViewModel}">
        <Grid>
            <Controls:SprintWarningBorder/>

            <ScrollViewer VerticalScrollBarVisibility="Disabled" VerticalAlignment="Stretch">
                <ItemsControl ItemsSource="{Binding TeamMembersIncludingUnassigned}" Focusable="False">
                    <ItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <WrapPanel>
                                <i:Interaction.Behaviors>
                                    <il:FluidMoveBehavior Duration="0:0:2" AppliesTo="Children" />
                                </i:Interaction.Behaviors>
                            </WrapPanel>
                        </ItemsPanelTemplate>
                    </ItemsControl.ItemsPanel>
                    <ItemsControl.ItemContainerStyle>
                        <Style TargetType="FrameworkElement">
                            <Setter Property="Margin" Value="6,6,6,0"/>
                            <Setter Property="Width" Value="7cm"/>
                            <Setter Property="Height" Value="3cm"/>
                            <Setter Property="HorizontalAlignment" Value="Center"/>
                            <Setter Property="VerticalAlignment" Value="Center"/>
                        </Style>
                    </ItemsControl.ItemContainerStyle>
                </ItemsControl>
            </ScrollViewer>
        </Grid>
    </DataTemplate>
</ResourceDictionary>